[FLINK-40087][mysql] Fix MySqlDefaultValueConverter fails to parse charset-introducer default values wrapped in double quotes and/or containing padding spaces (e.g. _UTF8MB4" 0 ")#4464
Conversation
…arset-introducer default values wrapped in double quotes and/or containing padding spaces (e.g. `_UTF8MB4" 0 "`)
|
@leonardBang @yuxiqian PTAL |
yuxiqian
left a comment
There was a problem hiding this comment.
One minor comment: can we add tests for snapshotting tables with double quoted default value fields?
IIRC default values are parsed differently in snapshotting (by SHOW CREATE TABLES) and incremental stages (by parsing DDL).
…ntroducer default values wrapped in double quotes and/or containing padding spaces (e.g. `_UTF8MB4" 0 "`)
…ntroducer default values wrapped in double quotes and/or containing padding spaces (e.g. `_UTF8MB4" 0 "`)
@yuxiqian Thanks for the review! I added testSnapshotWithCharsetIntroducerDefaultValue which creates a table with both single-quoted (_utf8mb4' 0 ') and double-quoted (_UTF8MB4" 0 ") character-set-introducer defaults (covering TINYINT / INT / BIGINT / DECIMAL / DATE / DATETIME / TINYINT(1)) before the Flink source starts, so the schema is discovered via SHOW CREATE TABLE during the snapshot phase. |
FLINK-40087 Fix MySqlDefaultValueConverter fails to parse charset-introducer default values wrapped in double quotes and/or containing padding spaces (e.g.
_UTF8MB4" 0 ")